package com.zhanghe.im.handler;

import com.zhanghe.im.protocol.command.Packet;
import com.zhanghe.im.response.QuitGroupResponsePacket;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class SimpleQuitGroupResponseHndler extends SimpleChannelInboundHandler<QuitGroupResponsePacket> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, QuitGroupResponsePacket msg) throws Exception {
        if(msg.getSuccess()){
            System.out.println("退出群[" + msg.getGroupId() + "]成功!");
        }else{
            System.err.println("退出群[" + msg.getGroupId() + "]失败");
        }
    }
}
